feat: Marten WritableStore backend + .NET 9/10 retarget (v6.0.0)#52
Merged
Conversation
Add Cocoar.Configuration.Marten — a tenant-aware (database-per-tenant) Marten/PostgreSQL IStoreBackend for the WritableStore. FromMartenStore() (service-backed, Layer-2) resolves IDocumentStore from DI and routes by accessor.Tenant; combine with .TenantScoped() so each tenant's overlay lives in its own database. Includes self-skipping Testcontainers integration tests. Retarget the library to net9.0;net10.0 (drop net8.0), aligned with .NET 10: Microsoft.Extensions.* and ProtectedData -> 10.0.8, Marten 9.3.4, test projects -> net10.0, global.json -> .NET 10 SDK, and CI setup-dotnet -> 9.0.x + 10.0.x. BREAKING CHANGE: drops .NET 8 support; consumers must target .NET 9 or later. +semver: major Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A major release is the window to drop APIs deprecated since v5: IConfigurationAccessor.GetRequiredConfig<T>()/(Type) -> GetConfig<T>()/(Type); FromMicrosoftSource() -> FromIConfiguration(); X509CertificateGenerator.GenerateAndSave() -> GenerateAndSavePfx/Pem. All call sites (tests, examples, current docs) migrated. Adds probe tests pinning the case-insensitive layer-merge behavior (verified, kept as-is). Also removed stale local build-output dirs from the working copy. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
It is specifically the Marten WritableStore backend, not a general 'all things Marten' package — the explicit name signals that concern (vs the ambiguous Cocoar.Configuration.Marten). Renames the project, test project, namespaces, solution entries, and all doc/changelog references. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
PostgreSqlBuilder.Build() validates Docker availability and throws DockerUnavailableException. It ran in the fixture's field initializer (outside the try), so on Docker-less runners (GitHub macOS) class-fixture init failed instead of skipping. Build the container inside InitializeAsync's try so the throw is caught -> Available=false -> tests skip cleanly. (Windows already skipped: its Docker endpoint exists so Build() passed and StartAsync failed inside the try.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Targets v6.0.0 (major —
+semver: majoron the feat commit). Rebased on top of the LF normalization (#51), so the diff is clean.Highlights
Marten WritableStore backend (new opt-in package)
Cocoar.Configuration.WritableStore.Marten— persists writable configuration overrides in Marten (PostgreSQL).MartenStoreBackend : IStoreBackend, oneCocoarConfigDocumentper config type.FromMartenStore()service-backed (Layer-2) rule resolvesIDocumentStorefrom DI; combine with.TenantScoped()for database-per-tenant config (each tenant's overlay in its own database). Works single-tenant too (drop.TenantScoped()).Retarget to .NET 9 / .NET 10 (BREAKING)
TargetFrameworks→net9.0;net10.0(net8 dropped).global.json→ .NET 10 SDK. Test projects → net10.0. CIsetup-dotnet→ 9.0.x + 10.0.x.Microsoft.Extensions.*→ 10.0.x (native net9 target, no runtime hit for net9 consumers), Marten 9.3.4.Removed APIs deprecated since v5 (BREAKING)
IConfigurationAccessor.GetRequiredConfig<T>()/(Type)→GetConfig<T>()/(Type)FromMicrosoftSource()→FromIConfiguration()X509CertificateGenerator.GenerateAndSave()→GenerateAndSavePfx/PemMisc
packages.md, changelog.Verification
dotnet packandvitepress buildverified locally.🤖 Generated with Claude Code